import sys

name = "wangyk"
age = 30
sex = "男"
phone = '10086'
address = "江西省吉安市吉州区樟山镇"

# 使用 f 标识 {} 为占位符
info = f"""
-----{name}档案-----
姓名：{name}
年龄：{age}
性别：{sex}
手机号：{phone}
地址：{address}
"""
print(info)

print("abandon", "banana", "candy", sep="###", end="\n", file=sys.stdout)

# 指定一个文件，默认是具有读权限，需要指定写权限
with open("a.txt", "r+") as file:
    print("abandon", "banana", "candy", sep="---", end="\n", file=file)

    content = file.read()
    print("" == content)
    print("file content is ", content)
